def credit(saving, debt, revenue, car=0, married=False, *house):
    max_loan = revenue * 5 + saving - debt + car
    for h in house:
        max_loan += h
    if married==True:
        max_loan *= 1.2

    return max_loan

if __name__ == '__main__':
    loan = credit(5000000, 300000, 8000, 300000, True, 5999999, 4000000)
    # print('该客户可贷款余额为：', loan)
    print(f'客户A可贷款余额为：{loan}')
    # print(f'该客户可贷款余额为：{loan:0.2e}'.format())
    # ？？？ 不定长参数如何通过关键字来传参
    # loan02 = credit(saving = 30000, debt = 60000, revenue = 12000, 800000, 900000)
    # print(f'客户B可贷款余额为：{loan02}')

    main